package com.fir.my.batis.plus.controller;

import com.fir.my.batis.plus.entity.SysUser;
import com.fir.my.batis.plus.service.ISysUserService;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


/**
 * <p>
 * 用户信息表 前端控制器
 * </p>
 *
 * @author fir
 * @since 2024-05-20 05:59:40
 */
@RestController
@RequestMapping("/sysUser")
public class SysUserController {


    /**
     * 用户信息表 服务类
     */
    @Resource
    private ISysUserService iSysUserService;


    @GetMapping("/list")
    public List<SysUser> get(){
        return iSysUserService.list();
    }

    @Transactional
    @PostMapping("/up")
    public Boolean up(SysUser sysUser){
        return iSysUserService.up(sysUser);
    }
}
